package cn.baimo.mapper;

import cn.baimo.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * ClassName: UserMapper
 * Description: 用户接口
 * date: 2020/8/8 0008 19:11:22
 *
 * @author BaiMo
 * @since JDK 1.8
 */
@Mapper
public interface UserMapper {
    //登录
    @Select("select * from user where uid=#{uid}  OR phone=#{phone} OR email=#{email} and pwd=#{pwd}")
    User selectUserByUidAndPwd(User user);

    //注册
    @Insert("insert into user values(#{uid},#{name},#{email},#{phone},#{pwd},#{regDataTime},null)")
    Integer insertUser(User user);
}